<template>
	<div >
		<header >
			<ul>
				<li @click="nav_click('business')" :class='{isActive: businessShow}'>业务总览</li>
				<li @click="nav_click('money')" :class='{isActive: moneyShow}'>收支总览</li>
				<li @click="nav_click('achievement')" :class='{isActive: achievementShow}'>绩效总览</li>
			</ul>
		</header>
		<div class="all_container" :style="{height: heightClient}" v-if="a">
			<square style="box-shadow: 1px 1px 1px 1px #ccc;">
				<div class="square_title">
					<span>住院情况</span>
					<span @click="moreClick('住院情况')">更多> </span>
				</div>
				<div class="square_content">
					<div class="content_title">平均住院</div>
					<div class="content_content">
						<div class="content_content_left">
							<span>{{busHosMonthHosThisMonth}}</span>日/人<br>
							<span>(本月)</span>
						</div>
						<div class="ge">|</div>
						<div class="content_content_right">
							<span>{{busHosMonthHosSamePeriod}}</span>日/人<br>
							<span>(同期)</span>
						</div>
					</div>
				</div>
				<div ref="pingjun" style="height: calc(70% - 60px); width: 100%;"></div>
			</square>
			<square  style="box-shadow: 1px 1px 1px 1px #ccc;">
				<div class="square_title">
					<span>门急诊情况</span>
					<span @click="moreClick('门急诊情况')">更多> </span>
				</div>
				<div class="square_content">
					<div class="content_title">门急诊量</div>
					<div class="content_content">
						<div class="content_content_left">
							<span>{{busEmeMonthHosThisMonth}}</span>号<br>
							<span>(本月)</span>
						</div>
						<div class="ge">|</div>
						<div class="content_content_right">
							<span>{{busEmeMonthHosSamePeriod}}</span>号<br>
							<span>(同期)</span>
						</div>
					</div>
				</div>
				<div ref="menzhen" style="height: calc(70% - 60px); width: 100%;" v-if="a"></div>
			</square>		
			<square  style="box-shadow: 1px 1px 1px 1px #ccc;">
				<div class="square_title">
					<span>手术情况</span>
					<span @click="moreClick('手术情况')">更多> </span>
				</div>
				<div class="square_content">
					<div class="content_title">手术量</div>
					<div class="content_content">
						<div class="content_content_left">
							<span>{{busSurMonthHosThisMonth}}</span>台<br>
							<span>(本月)</span>
						</div>
						<div class="ge">|</div>
						<div class="content_content_right">
							<span>{{busSurMonthHosSamePeriod}}</span>台<br>
							<span>(同期)</span>
						</div>
					</div>
				</div>
				<div ref="shoushu" style="height: calc(70% - 60px); width: 100%;" v-if="a"></div>
			</square>
			<square  style="box-shadow: 1px 1px 1px 1px #ccc;">
				<div class="square_title">
					<span>药品使用情况</span>
					<span @click="moreClick('药品使用情况')">更多> </span>
				</div>
				<div class="square_choose">
					<span>药品总额：</span>
					<span>{{medIncomeTotal}}</span>
					<span>元</span>
					<span @click="chooseNavClick('药品同期')" :class="{active: !medicinetong}">同期</span>
					<span @click="chooseNavClick('药品本月')" :class="{active: medicinetong}">本月</span>
				</div>
				<div ref="medicine" style="width: 100%; height: calc(85% - 75px);" v-if="a"></div>
			</square>
			<square  style="box-shadow: 1px 1px 1px 1px #ccc;">
				<div class="square_title">
					<span>耗材使用情况</span>
					<span @click="moreClick('耗材使用情况')">更多> </span>
				</div>
				<div class="square_choose">
					<span>耗材总额：</span>
					<span>{{conTotal}}</span>
					<span>元</span>
					<span @click="chooseNavClick('耗材同期')" :class="{active: !haotong}">同期</span>
					<span @click="chooseNavClick('耗材本月')" :class="{active: haotong}">本月</span>
				</div>
				<div ref="timeout" style="width: 100%; height: calc(85% - 75px);" v-if="a"></div>
			</square>
			<square  style="box-shadow: 1px 1px 1px 1px #ccc;">
				<div class="square_title">
					<span>扣罚情况</span>
					<span @click="moreClick('扣罚情况')">更多> </span>
				</div>
				<div class="square_choose">
					<span>扣款总额：</span>
					<span>{{penTotal}}</span>
					<span>元</span>
					<span @click="chooseNavClick('扣款同期')" :class="{active: !koutong}">同期</span>
					<span @click="chooseNavClick('扣款本月')" :class="{active: koutong}">本月</span>
				</div>
				<div ref="koufa" style="width: 100%; height: calc(85% - 75px);" v-if="a"></div>
			</square>
		</div>
	</div>
</template>
<script>
import echarts from 'echarts'
import square from './common/square'
import axios from 'axios'
export default {
	data () {
		return {
			busEmeMonthHosThisMonth: '',//门急诊本月
			busEmeMonthHosSamePeriod: '', //门急诊同期
			busHosMonthHosSamePeriod: '',//住院同期	
			busHosMonthHosThisMonth: '',//住院本月
			busSurMonthHosSamePeriod: '',//手术同期
			busSurMonthHosThisMonth: '',//手术本月
			medIncomeTotal: '',//药品总额
			busMedMonthHos: {},//药品使用情况总数据
			conTotal: '',//耗材总额
			busConMonthHos: {},//耗材使用情况
			penTotal: '',//扣罚总额
			busPenMonthHos: {},//扣罚情况
			businessShow: true,
			a: true,
			heightClient: '0px',
			choosetype: '药品本月',
			moneyShow: false,
			medicinetong: true,
			haotong: true,
			koutong: true,
			achievementShow: false,
			optionsMen: {
			    tooltip : {
			        trigger: 'axis'
			    },
			    grid: {
			        top:'15%',
			        left: '-15%',
			        right: '-10%',
			        bottom: '0%',
			        containLabel: true
			    },
			    xAxis : [
			        {
			            type : 'category',
			            boundaryGap : false,
			            show: false,
			            data: ['...']
			        }
			    ],
			    yAxis : [
			        {
			            type : 'value',
			            show: false
			        }
			    ],
			    series : [
			        {
			            name:'门急诊量',
			            type:'line',
			            stack: '总量',
			            symbol: 'none',
			            smooth: true,
			            markPoint: {
			                data: [
			                   {coord: []} 
			                ],
			                symbol: 'image://',
			                symbolSize: [80,30],
			                symbolOffset: ['0', '-60%'],
			                color: '#fff',
			                label: {
			                	show: true,
			                	color: '#fff',
			                	position: ['20%','20%'],
			                	formatter: function(params) {
			                		return params.data.coord[0]
			                	}
			                }
			            },
			             itemStyle: {
			                normal: {
			                    color: '#2FA4DB'
			                }
			            },
			            // areaStyle: {normal: {}},
			            areaStyle: {
			                normal: {
			                    opacity: 1,
			                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
			                        offset: 0,
			                        color: 'rgba(60,159,206,1)'
			                    }, {
			                        offset: 1,
			                        color: 'rgba(255,255,255,0.1)'
			                    }])
			                }
			    //             color: {
							//     type: 'linear',
							//     x: 0,
							//     y: 0,
							//     x2: 0,
							//     y2: 1,
							//     colorStops: [{
							//         offset: 0, color: '#3C9FCE' // 0% 处的颜色
							//     }, {
							//         offset: 1, color: '#FFFFFF' // 100% 处的颜色
							//     }],
							//     globalCoord: false // 缺省为 false
							// }
			            },
			            data:[
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{	
			            		symbol: 'image://',
			            		symbolSize: 10,
			            		color: '#fff',
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            ]
			        }
			    ]
			},
			optionsZhu: {
			    tooltip : {
			    	show: true,
			        trigger: 'axis'
			        // axisPointer: {
			        //     type: 'cross',
			        //     label: {
			        //         backgroundColor: '#6a7985'
			        //     }
			        // }
			    },
			    grid: {
			        top:'15%',
			        left: '-10%',
			        right: '-10%',
			        bottom: '0%',
			        containLabel: true
			    },
			    xAxis : [
			        {
			            type : 'category',
			            boundaryGap : false,
			            show: false,
			            data : ['...']
			        }
			    ],
			    yAxis : [
			        {
			            type : 'value',
			            show: false
			        }
			    ],
			    series : [
			        {
			            name:'住院情况',
			            symbol: 'none',
			            type:'line',
			            stack: '住院情况',
			            markPoint: {
			                data: [
			                   {coord: []} 
			                ],
			                symbol: 'image://',
			                symbolSize: [80,30],
			                symbolOffset: ['0', '-60%'],
			                color: '#fff',
			                label: {
			                	show: true,
			                	color: '#fff',
			                	position: ['20%','20%'],
			                	formatter: function(params) {
			                		return params.data.coord[0]
			                	}
			                }
			            },
			            smooth: true,
			             itemStyle: {
			                normal: {
			                    color: '#2FA4DB'
			                }
			            },
			            // areaStyle: {normal: {}},
			            areaStyle: {
							normal: {
			                    opacity: 1,
			                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
			                        offset: 0,
			                        color: 'rgba(60,159,206,1)'
			                    }, {
			                        offset: 1,
			                        color: 'rgba(255,255,255,0.1)'
			                    }])
			                }
			            },
			            data:[
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		symbol: 'image://',
			            		symbolSize: 10,
			            		color: '#fff',
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{

			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            ]
			        }
			    ]
			},
			optionsShou: {
			    tooltip : {
			        trigger: 'axis'
			    },

			    grid: {
			    	top:'15%',
			        left: '-10%',
			        right: '-10%',
			        bottom: '0%',
			        containLabel: true
			    },
			    xAxis : [
			        {
			            type : 'category',
			            boundaryGap : false,
			            show: false,
			            data : ['...']
			        }
			    ],
			    yAxis : [
			        {
			            type : 'value',
			            show: false
			        }
			    ],
			    series : [
			        {
			            name:'手术量',
			            symbol: 'none',
			            type:'line',
			            stack: '总量',
			            markPoint: {
			                data: [
			                   {coord: []} 
			                ],
			                symbol: 'image://',
			                symbolSize: [80,30],
			                symbolOffset: ['0', '-60%'],
			                color: '#fff',
			                label: {
			                	show: true,
			                	color: '#fff',
			                	position: ['20%','20%'],
			                	formatter: function(params) {
			                		return params.data.coord[0]
			                	}
			                }
			            },
			            smooth: true,
			             itemStyle: {
			                normal: {
			                    color: '#2FA4DB'
			                }
			            },
			            // areaStyle: {normal: {}},
			            areaStyle: {
			            	normal: {
			                    opacity: 1,
			                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
			                        offset: 0,
			                        color: 'rgba(60,159,206,1)'
			                    }, {
			                        offset: 1,
			                        color: 'rgba(255,255,255,0.1)'
			                    }])
			                }
			            },
			            data:[
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{	
			            		symbol: 'image://',
			            		symbolSize: 10,
			            		color: '#fff',
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            	{
			            		value: 0,
			            		label: {
			            			show: false
			            		}
			            	},
			            ]
			        }
			    ]
			},
			optionsMedicine: {
			  	tooltip : {
			  		show: true,
			        // trigger: 'none',
			        // formatter: "{b} : {d}%  <br />总额: {c}",
			        formatter: function(params) {
			        	var res = params.name + '：' + params.value.toString().replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,') + '<br/>占比： '+ params.percent+ '%' ;
			        	// var res = JSON.stringify(params)

			        	return res
			        }
			    },
			    legend: {
			        orient: 'vertical',
			        bottom: 0,
			        itemWidth: 14,
			        align: 'right',
			        right: 10,
			        data: [
			        	{
			        		icon: 'circle',
			        		name: '中药饮片',
			        		textStyle: {
        						fontSize: '12'
    						}
			        	}, 
			        	{
			        		icon: 'circle',
			        		name: '中成药'
			        	},
			        	{
			        		icon: 'circle',
			        		name: '西药'
			        	}
			        ]
			    },
			    series : [
			        {
			            type: 'pie',
			            radius : '95%',
			            center: ['50%', '50%'],
			            selectedMode: 'single',
			            label: {
			            	show: false
			            },
			            hoverOffset: 3,
			            data:[
			                {
			                    name: '中药饮片',
			                    itemStyle: {
			                    	color: '#6BB3ED'
			                    }
			                },
			                {
			                	name: '中成药',
			                    itemStyle: {
			                    	color: '#8CD88A'
			                    }
			                },
			                {
			                	name: '西药',
			                    itemStyle: {
			                    	color: '#B0A8DE'
			                    }
			                }
			            ],
			            itemStyle: {
			                emphasis: {
			                    shadowBlur: 10,
			                    shadowOffsetX: 0,
			                    shadowColor: 'rgba(0, 0, 0, 0.5)'
			                }
			            }
			        }
			    ]
			},
			optionsTimeout: {
			    tooltip : {
			        trigger: 'item',
			        // formatter: "{b} : {c} ({d}%)"
			        formatter: function(params) {
			        	var res = params.name + '：' + params.value.toString().replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,') + '<br/>占比： '+ params.percent+ '%' ;
			        	// var res = JSON.stringify(params)

			        	return res
			        }
			    },
			    legend: {
			        orient: 'vertical',
			        // top: 'middle',
			        bottom: 0,
			        //left: 'right',
			        itemWidth: 14,
			        align: 'right',
			        right: 10,
			        data: [
			        	{
			        		icon: 'circle',
			        		name: '非护理耗材',
			        	}, 
			        	{
			        		icon: 'circle',
			        		name: '护理耗材'
			        	}
			        ]
			    },
			    series : [
			        {
			            type: 'pie',
			            radius : '95%',
			            center: ['50%', '50%'],
			            selectedMode: 'single',
			            label: {
			            	show: false
			            },
			            hoverOffset: 3,
			            data:[
			                {
			                    name: '非护理耗材',
			                    itemStyle: {
			                    	color: '#63C2C6'
			                    }
			                },
			                {
			                	name: '护理耗材',
			                    itemStyle: {
			                    	color: '#CFDF87'
			                    }
			                }
			            ],
			            itemStyle: {
			                emphasis: {
			                    shadowBlur: 10,
			                    shadowOffsetX: 0,
			                    shadowColor: 'rgba(0, 0, 0, 0.5)'
			                }
			            }
			        }
			    ]
			},
			optionsKou: {
			    tooltip : {
			        trigger: 'item',
			        // formatter: "{b} : {c} ({d}%)"
			        formatter: function(params) {
			        	var res = params.name + '：' + params.value.toString().replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,') + '<br/>占比： '+ params.percent+ '%' ;
			        	// var res = JSON.stringify(params)

			        	return res
			        }
			    },
			    legend: {
			        orient: 'vertical',
			        // top: 'middle',
			        bottom: 0,
			        //left: 'right',
			        itemWidth: 14,
			        align: 'right',
			        right: 10,
			        data: [
			        	{
			        		icon: 'circle',
			        		name: '医保拒付'
			        	}, 
			        	{
			        		icon: 'circle',
			        		name: '医疗安全部扣罚'
			        	},
			        	{
			        		icon: 'circle',
			        		name: '其他'
			        	}
			        ]
			    },
			    series : [
			        {
			            type: 'pie',
			            radius : '95%',
			            center: ['50%', '50%'],
			            selectedMode: 'single',
			            label: {
			            	show: false,
			            },
			            hoverOffset: 3,
			            data:[
			                {
			                    name: '医保拒付',
			                    itemStyle: {
			                    	color: '#99D2A5'
			                    }
			                },
			                {
			                	name: '医疗安全部扣罚',
			                    itemStyle: {
			                    	color: '#E8D352'
			                    }
			                },
			                {
			                	name: '其他',
			                    itemStyle: {
			                    	color: '#72B8EF'
			                    }
			                }
			            ],
			            itemStyle: {
			                emphasis: {
			                    shadowBlur: 10,
			                    shadowOffsetX: 0,
			                    shadowColor: 'rgba(0, 0, 0, 0.5)'
			                }
			            }
			        }
			    ]
			}
		}
	},
	components: {
		square
	},
	created () {
		// console.log(this.$store.state.user)
		this.heightClient = document.body.clientHeight - 140 + 'px'
		this.a = false
		this.a = true
		// this.month = '2018-01'
		this.businesOverview()
		//console.log(document.body.clientHeight)
	},
	props: ['month'],
	watch: {
		month (newV, oldV) {
			this.month = newV
			this.medicinetong = true
			this.haotong = true 
			this.koutong = true
			this.businesOverview()
		},
		heightClient (newa, old) {
			this.a = false
			this.a = true
			this.bian()
		}
	},
	methods: {
		number(data) {
  			if(data != null) {
  				return data.toString().replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g,'$&,')
  			} else {
  				return
  			}
  		},    
		bian () {
			this.myChart = echarts.init(this.$refs.menzhen)
			this.myChart.setOption(this.optionsMen)

			this.myChart = echarts.init(this.$refs.pingjun)
			this.myChart.setOption(this.optionsZhu)

			this.myChart = echarts.init(this.$refs.shoushu)
			this.myChart.setOption(this.optionsShou)

			this.myChart = echarts.init(this.$refs.medicine)
			this.myChart.setOption(this.optionsMedicine)

			this.myChart = echarts.init(this.$refs.timeout)
			this.myChart.setOption(this.optionsTimeout)

			this.myChart = echarts.init(this.$refs.koufa)
			this.myChart.setOption(this.optionsKou)
		},
		nav_click (type) {
			this.businessShow = false
			this.moneyShow = false
			this.achievementShow = false
			type === 'business' ? this.businessShow = true : type === 'money' ? this.moneyShow = true : this.achievementShow = true

			type === 'money' ? this.$router.push('/income') : type === 'business' ? this.$router.push('/all') : this.$router.push('/jixiaoall')
		},
		// timeChange (month) {
		// },
		chooseNavClick (type) {
			this.choosetype = type
			if (type === '药品本月') {
				this.medicinetong = true
				this.medIncomeTotal = this.number(Number(this.busMedMonthHos.thisMonth.medIncomeTotal))
				this.optionsMedicine.series[0].data[0].value = Number(this.busMedMonthHos.thisMonth.medDrinkIncome)
				this.optionsMedicine.series[0].data[1].value = Number(this.busMedMonthHos.thisMonth.medMidIncome)
				this.optionsMedicine.series[0].data[2].value = Number(this.busMedMonthHos.thisMonth.medWestIncome)
				this.myChart = echarts.init(this.$refs.medicine)
				this.myChart.setOption(this.optionsMedicine)
			} else if (type === '药品同期') {
				this.medicinetong = false
				this.medIncomeTotal = this.number(Number(this.busMedMonthHos.samePeriod.medIncomeTotal))
				this.optionsMedicine.series[0].data[0].value = Number(this.busMedMonthHos.samePeriod.medDrinkIncome)
				this.optionsMedicine.series[0].data[1].value = Number(this.busMedMonthHos.samePeriod.medMidIncome)
				this.optionsMedicine.series[0].data[2].value = Number(this.busMedMonthHos.samePeriod.medWestIncome)
				this.myChart = echarts.init(this.$refs.medicine)
				this.myChart.setOption(this.optionsMedicine)
			} else if (type === '耗材本月') {
				this.haotong = true
				this.conTotal = this.number(Number(this.busConMonthHos.thisMonth.conTotal))
				this.optionsTimeout.series[0].data[0].value = Number(this.busConMonthHos.thisMonth.conDocNum)
				this.optionsTimeout.series[0].data[1].value = Number(this.busConMonthHos.thisMonth.conNurNum)
				this.myChart = echarts.init(this.$refs.timeout)
				this.myChart.setOption(this.optionsTimeout)
			} else if (type === '耗材同期') {
				this.haotong = false
		
				this.conTotal = this.number(Number(this.busConMonthHos.samePeriod.conTotal))

				this.optionsTimeout.series[0].data[0].value = Number(this.busConMonthHos.samePeriod.conDocNum)
				this.optionsTimeout.series[0].data[1].value = Number(this.busConMonthHos.samePeriod.conNurNum)
				this.myChart = echarts.init(this.$refs.timeout)
				this.myChart.setOption(this.optionsTimeout)
			} else if (type === '扣款本月') {
				this.koutong = true
						// this.busPenMonthHos()
				this.penTotal = this.number(Number(this.busPenMonthHos.thisMonth.penTotal))
				this.optionsKou.series[0].data[0].value = Number(this.busPenMonthHos.thisMonth.refusePay)
				this.optionsKou.series[0].data[1].value = Number(this.busPenMonthHos.thisMonth.safePen)
				this.optionsKou.series[0].data[2].value = Number(this.busPenMonthHos.thisMonth.otherPay)
				this.myChart = echarts.init(this.$refs.koufa)
				this.myChart.setOption(this.optionsKou)
			} else {
				this.koutong = false
			
						// this.busPenMonthHos()
				this.penTotal = this.number(Number(this.busPenMonthHos.samePeriod.penTotal))
				// alert(this.busPenMonthHos.samePeriod.penTotal)
				this.optionsKou.series[0].data[0].value = Number(this.busPenMonthHos.samePeriod.refusePay)
				this.optionsKou.series[0].data[1].value = Number(this.busPenMonthHos.samePeriod.safePen)
				this.optionsKou.series[0].data[2].value = Number(this.busPenMonthHos.samePeriod.otherPay)
				this.myChart = echarts.init(this.$refs.koufa)
				this.myChart.setOption(this.optionsKou)
			}
 		},
 		moreClick (type) {
 			this.$router.push('/detail/' + type)
 		},
 		businesOverview () {
 			// alert(this.month)
 			var qs = require('qs');
          var self = this
 			// self.optionsMen.xAxis[0].data = []
    //       self.optionsMen.series[0].data = []
    //       	self.optionsZhu.xAxis[0].data = []
    //       	self.optionsZhu.series[0].data = []
    //       	self.optionsShou.xAxis[0].data = []
    //       	self.optionsShou.series[0].data = []
          axios.post('/service', qs.stringify({"data": JSON.stringify({
              command: 'businesOverview',
              platform: 'web',
              monthTime: self.month
             })}), {
              headers: {
               "BBG-Key": "ab9ef204-3253-49d4-b229-3cc2383480a6",
              }
             })
             .then(function (rep) {
              if (rep.data.statusCode === '10001') {
               //住院情况
               self.busHosMonthHosSamePeriod = self.number(Number(rep.data.data.busHosMonthHos.samePeriod.aveHosDay))
               self.busHosMonthHosThisMonth = self.number(Number(rep.data.data.busHosMonthHos.thisMonth.aveHosDay))
               self.optionsZhu.xAxis[0].data = rep.data.data.busHosMonthHos.thisMonth.monthTrend.xData
               self.optionsZhu.series[0].markPoint.data[0].coord[0] = self.month
               self.optionsZhu.series[0].markPoint.data[0].coord[1] = rep.data.data.busHosMonthHos.thisMonth.monthTrend.yData[4]
               rep.data.data.busHosMonthHos.thisMonth.monthTrend.yData.forEach((item,index) => {
               	self.optionsZhu.series[0].data[index].value = item
               })
               self.myChart1 = echarts.init(self.$refs.pingjun)
				self.myChart1.setOption(self.optionsZhu)
				//门急诊情况
               self.busEmeMonthHosThisMonth = self.number(Number(rep.data.data.busEmeMonthHos.thisMonth.medicalPeo))
               self.busEmeMonthHosSamePeriod = self.number(Number(rep.data.data.busEmeMonthHos.samePeriod.medicalPeo))
               self.optionsMen.xAxis[0].data = rep.data.data.busEmeMonthHos.thisMonth.monthTrend.xData
               rep.data.data.busEmeMonthHos.thisMonth.monthTrend.yData.forEach((item,index) => {
               	self.optionsMen.series[0].data[index].value = item
               })
               // self.optionsMen.series[0].data = rep.data.data.busEmeMonthHos.thisMonth.monthTrend.yData
               self.optionsMen.series[0].markPoint.data[0].coord[0] = self.month
               self.optionsMen.series[0].markPoint.data[0].coord[1] = rep.data.data.busEmeMonthHos.thisMonth.monthTrend.yData[4]
               self.myChart2 = echarts.init(self.$refs.menzhen)
				self.myChart2.setOption(self.optionsMen)
               //手术情况
               self.busSurMonthHosThisMonth = self.number(Number(rep.data.data.busSurMonthHos.thisMonth.surgeryNum))
               self.busSurMonthHosSamePeriod = self.number(Number(rep.data.data.busSurMonthHos.samePeriod.surgeryNum))
               self.optionsShou.xAxis[0].data = rep.data.data.busSurMonthHos.thisMonth.monthTrend.xData
               // self.optionsShou.series[0].data = rep.data.data.busSurMonthHos.thisMonth.monthTrend.yData
               rep.data.data.busSurMonthHos.thisMonth.monthTrend.yData.forEach((item,index) => {
               	self.optionsShou.series[0].data[index].value = item
               })
               self.optionsShou.series[0].markPoint.data[0].coord[0] = self.month
               self.optionsShou.series[0].markPoint.data[0].coord[1] = rep.data.data.busSurMonthHos.thisMonth.monthTrend.yData[4]
               // self.optionsShou.xAxis[0].data.push('test')
               // self.optionsShou.series[0].data.push(0)
               // self.optionsShou.xAxis[0].data.unshift('test')
               // self.optionsShou.series[0].data.unshift(0)
               	self.myChart3 = echarts.init(self.$refs.shoushu)
				self.myChart3.setOption(self.optionsShou)

               //药品
               self.busMedMonthHos = rep.data.data.busMedMonthHos
               self.medIncomeTotal = self.number(Number(self.busMedMonthHos.thisMonth.medIncomeTotal))
               self.optionsMedicine.series[0].data[0].value = Number(self.busMedMonthHos.thisMonth.medDrinkIncome)
				self.optionsMedicine.series[0].data[1].value = Number(self.busMedMonthHos.thisMonth.medMidIncome)
				self.optionsMedicine.series[0].data[2].value = Number(self.busMedMonthHos.thisMonth.medWestIncome)
				self.myChart = echarts.init(self.$refs.medicine)
				self.myChart.setOption(self.optionsMedicine)

				//耗材
				self.busConMonthHos = rep.data.data.busConMonthHos
				self.conTotal = self.number(Number(self.busConMonthHos.thisMonth.conTotal))
				self.optionsTimeout.series[0].data[0].value = Number(self.busConMonthHos.thisMonth.conDocNum)
				self.optionsTimeout.series[0].data[1].value = Number(self.busConMonthHos.thisMonth.conNurNum)
				self.myChart = echarts.init(self.$refs.timeout)
				self.myChart.setOption(self.optionsTimeout)

				//扣罚
				self.busPenMonthHos = rep.data.data.busPenMonthHos
				self.penTotal = self.number(Number(self.busPenMonthHos.thisMonth.penTotal))
				// alert(self.penTotal)
				self.optionsKou.series[0].data[0].value = Number(self.busPenMonthHos.thisMonth.refusePay)
				self.optionsKou.series[0].data[1].value = Number(self.busPenMonthHos.thisMonth.safePen)
				self.optionsKou.series[0].data[2].value = Number(self.busPenMonthHos.thisMonth.otherPay)

				self.myChart = echarts.init(self.$refs.koufa)
				self.myChart.setOption(self.optionsKou)

              } else if (rep.data.statusCode === '10003'){
              	 	self.$router.push('/login')
              	}
             }).catch(function (error) {
              // console.log(error);
             });
 		}
	},
	mounted () {
	}
}
</script>
<style type="text/css">
	.div-tip-warp{
   		background-color: #485465;
	}
	.tip-background{
	   	padding: 2px 8px;
	   	background-color: #485465;
	   	border-radius:3px;
	}
	.triangle-down {
	   	width: 0;
	   	height: 0;
	   	border-left: 7px solid transparent;
	   	border-right: 7px solid transparent;
	   	border-top: 7px solid #485465;
	}
	.triangle-position{
	   	margin-left: 55px;
	}
</style>
<style lang="scss" scoped>
	header {
		width: 100%;
		background: #fff;
		height: 63px;
		display: flex;
		justify-content: center;
		ul{
			height: 63px;
			// margin-left: 30%;
			li {
				float: left;
				line-height: 63px;
				width: 140px;
				text-align: center;
				font-size: 17px;
				color: #646464;
				cursor: pointer;
				&:hover {
					color: #1EA0DD;
				}
			}
		}
		.isActive{
			color: #0385C1 !important;
		}
	}
	.all_container{
		width: 100%;
		min-height: 550px;
		background: #f8f8f8;
		overflow:hidden;
		zoom:1;
		
		.square_title{
			height: 43px;
			padding: 0 20px;
			line-height: 43px;
			border-bottom: 1px solid #ddd;
			font-size: 17px;
			span:nth-child(1){
				float: left;
				font-weight: bold;
			}
			span:nth-child(2){
				float: right;
				cursor: pointer;
				color: #646464;
				&:hover {
            		color: #2FA4DB;
        		}
			}
		}
		.square_content{
			width: 100%;
			height: 29%;
			text-align: center;
			.content_title{
				font-family: "微软雅黑,PingFangSC";
				font-size: 16px;
				color: #646464;
				margin-bottom: 20px;
				text-align: left;
				margin-top: 20px;
				text-indent: 30px;
			}
			span{
				font-family: "微软雅黑,PingFangSC";
				display: inline-block;
			}
			span:nth-child(1){
				padding-bottom: 8px;
			}
			.content_content_right, .content_content_left, .ge{
				float: left;
				color: #646464;
				font-size: 16px;
			}
			.ge{
				font-size: 24px;
				margin-top: 10px;
				color: #D3D3D3;
				// margin-right: 20px;
			}
			.content_content_left{
				width: 48%;
				// margin-right: 20px;
				span:nth-child(1){
					font-size: 24px;
					color: #0385C1;
					height: 25%;
					display: inline-block;
					margin-right: 10px;
				}
			}
			.content_content_right{
				// margin-left: 20px;
				width: 48%;
				// margin-top: 10px;
				span:nth-child(1){
					font-size: 24px;
					height: 25%;
					display: inline-block;
					margin-right: 10px;
				}
			}

		}
		.square_choose{
			margin-top: 20px;
			height: 15%;
			padding-left: 30px;
			font-size: 14px;
			color: #646464;
			margin-right: 20px;
			span{
				font-family: "微软雅黑,PingFangSC";
				display: inline-block;
			}
			span:nth-child(2){
				font-size: 18px;
			}
			span:nth-child(4), span:nth-child(5) {
				float: right;
				width: 40px;
				height: 22px;
				line-height: 22px;
				color: #fff;
				text-align: center;
				cursor: pointer;
				background: #C1BFBF;
				&:hover {
					background: #63A5DF;
					color: #fff;
				}
			}
			.active {
				background: #418ED2 !important;
			}
		}
	}
</style>